Conversation
fix #628 ## Summary by Sourcery Bug Fixes: - 通过检测并在重试前自动退出回到地图界面,处理在访问世界存储期间意外进入情报界面的情况。 <details> <summary>Original summary in English</summary> ## Summary by Sourcery Bug Fixes: - Handle accidental entry into the intel screen during world storage access by detecting it and automatically exiting back to the map before retrying. </details>
1. 调整结算界面判断逻辑,仅在检测到OPTS_INFO_D弹窗时才标记沉船,避免S/A/B评价过渡帧误匹配 2. 修复emotion模块中舰队心情属性未同步更新的问题,确保心情恢复计算正确
调整了战斗结算界面的判断逻辑,不再在误匹配D评价模板时继续循环等待,而是直接退出当前战斗循环,由后续流程统一处理结算弹窗,确保沉船时的心情扣减逻辑正确触发。
## Summary by Sourcery 调整 D 级战斗结果的处理,避免将临时动画帧误判为实际的舰沉事件,并澄清情绪追踪的行为。 Bug 修复: - 在标准战斗中,当更高评级的结算动画短暂出现与 D 级结算画面匹配的帧时,防止错误触发舰沉导致的情绪惩罚。 - 在联合自沉流程中,当短暂出现与 D 级结算画面匹配但未实际确认舰沉的情况时,防止错误设置舰沉标记。 增强: - 明确舰队情绪记录的文档说明,解释基于属性的配置更新机制,避免冗余赋值。 <details> <summary>Original summary in English</summary> ## Summary by Sourcery Adjust D-rank battle result handling to avoid misclassifying temporary animation frames as actual shipwrecks and clarify emotion tracking behavior. Bug Fixes: - Prevent false shipwreck mood penalties in standard combat when D-rank result screens are briefly matched during higher-rank result animations. - Prevent false shipwreck flags in coalition scuttle flow when D-rank result screens are briefly matched without actual shipwreck confirmation. Enhancements: - Clarify documentation for fleet emotion recording to explain property-based config updates and avoid redundant assignments. </details> <details> <summary>Original summary in English</summary> ## Summary by Sourcery 调整 D 级战斗结果的处理,避免将临时动画帧误判为实际的舰沉事件,并澄清情绪追踪的行为。 Bug 修复: - 在标准战斗中,当更高评级的结算动画短暂出现与 D 级结算画面匹配的帧时,防止错误触发舰沉导致的情绪惩罚。 - 在联合自沉流程中,当短暂出现与 D 级结算画面匹配但未实际确认舰沉的情况时,防止错误设置舰沉标记。 增强: - 明确舰队情绪记录的文档说明,解释基于属性的配置更新机制,避免冗余赋值。 <details> <summary>Original summary in English</summary> ## Summary by Sourcery Adjust D-rank battle result handling to avoid misclassifying temporary animation frames as actual shipwrecks and clarify emotion tracking behavior. Bug Fixes: - Prevent false shipwreck mood penalties in standard combat when D-rank result screens are briefly matched during higher-rank result animations. - Prevent false shipwreck flags in coalition scuttle flow when D-rank result screens are briefly matched without actual shipwreck confirmation. Enhancements: - Clarify documentation for fleet emotion recording to explain property-based config updates and avoid redundant assignments. </details> </details>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Reviewer's Guide调整战斗结果处理逻辑,以避免将短暂出现的 D 级结算画面误判为真实船沉;引入更安全的仓库进入流程,可在误触进入任务界面时通过带退避重试的方式恢复;并通过文档澄清情绪记录行为。 更新后 D 级战斗结果与情绪处理的时序图sequenceDiagram
participant AutoSearchCombat
participant Emotion
loop battle_result_polling
AutoSearchCombat->>AutoSearchCombat: appear(OPTS_INFO_D)
alt OPTS_INFO_D_detected
AutoSearchCombat->>AutoSearchCombat: set _withdraw = True
AutoSearchCombat->>AutoSearchCombat: set _is_shipwreck = True
AutoSearchCombat->>Emotion: reduce(fleet_index, shipwreck=True)
note right of AutoSearchCombat: break
else D_rank_screen_only
AutoSearchCombat->>AutoSearchCombat: appear(BATTLE_STATUS_D)
AutoSearchCombat->>AutoSearchCombat: appear(EXP_INFO_D)
opt BATTLE_STATUS_D_or_EXP_INFO_D_detected
AutoSearchCombat->>AutoSearchCombat: set _withdraw = True
note right of AutoSearchCombat: break
end
else timeout
AutoSearchCombat->>AutoSearchCombat: confirm_timer.reached()
opt confirm_timer_reached
AutoSearchCombat->>AutoSearchCombat: set _withdraw = True
note right of AutoSearchCombat: break
end
end
end
AutoSearchCombat->>AutoSearchCombat: auto_search_combat_status()
AutoSearchCombat->>AutoSearchCombat: handle_battle_status()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your Experience访问你的 dashboard 来:
Getting HelpOriginal review guide in EnglishReviewer's GuideAdjusts combat result handling to avoid misclassifying transient D-rank frames as true shipwrecks, introduces a safer warehouse entry flow that recovers from accidentally opening the mission screen with backoff retries, and clarifies emotion recording behavior via documentation. Sequence diagram for updated D-rank combat result and emotion handlingsequenceDiagram
participant AutoSearchCombat
participant Emotion
loop battle_result_polling
AutoSearchCombat->>AutoSearchCombat: appear(OPTS_INFO_D)
alt OPTS_INFO_D_detected
AutoSearchCombat->>AutoSearchCombat: set _withdraw = True
AutoSearchCombat->>AutoSearchCombat: set _is_shipwreck = True
AutoSearchCombat->>Emotion: reduce(fleet_index, shipwreck=True)
note right of AutoSearchCombat: break
else D_rank_screen_only
AutoSearchCombat->>AutoSearchCombat: appear(BATTLE_STATUS_D)
AutoSearchCombat->>AutoSearchCombat: appear(EXP_INFO_D)
opt BATTLE_STATUS_D_or_EXP_INFO_D_detected
AutoSearchCombat->>AutoSearchCombat: set _withdraw = True
note right of AutoSearchCombat: break
end
else timeout
AutoSearchCombat->>AutoSearchCombat: confirm_timer.reached()
opt confirm_timer_reached
AutoSearchCombat->>AutoSearchCombat: set _withdraw = True
note right of AutoSearchCombat: break
end
end
end
AutoSearchCombat->>AutoSearchCombat: auto_search_combat_status()
AutoSearchCombat->>AutoSearchCombat: handle_battle_status()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我在这里给出了一些总体反馈:
- 在
storage_enter中,wait_seconds随着time.sleep递增,如果持续发生路径错误,等待时间可能会无限增长;建议对退避时间做上限,或者增加最大重试次数,以避免长时间阻塞睡眠导致潜在卡死。 - D 级结算(D-rank settlement)的处理逻辑及其解释性注释在
auto_search_combat_execute和coalition_scuttle.auto_search_combat_execute中是重复的;建议将这部分抽取到一个共享的工具函数或常量中,以保持行为和设计理由的一致性。
面向 AI 代理的提示
Please address the comments from this code review:
## Overall Comments
- In `storage_enter`, the incrementally increasing `wait_seconds` with `time.sleep` can grow without bound if misnavigation keeps happening; consider capping the backoff or adding a maximum retry count to avoid long blocking sleeps and potential hangs.
- The D-rank settlement handling logic and its explanatory comments are duplicated between `auto_search_combat_execute` and `coalition_scuttle.auto_search_combat_execute`; consider extracting this into a shared helper or constant to keep behavior and rationale synchronized.帮我变得更有用吧!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的代码评审。
Original comment in English
Hey - I've left some high level feedback:
- In
storage_enter, the incrementally increasingwait_secondswithtime.sleepcan grow without bound if misnavigation keeps happening; consider capping the backoff or adding a maximum retry count to avoid long blocking sleeps and potential hangs. - The D-rank settlement handling logic and its explanatory comments are duplicated between
auto_search_combat_executeandcoalition_scuttle.auto_search_combat_execute; consider extracting this into a shared helper or constant to keep behavior and rationale synchronized.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `storage_enter`, the incrementally increasing `wait_seconds` with `time.sleep` can grow without bound if misnavigation keeps happening; consider capping the backoff or adding a maximum retry count to avoid long blocking sleeps and potential hangs.
- The D-rank settlement handling logic and its explanatory comments are duplicated between `auto_search_combat_execute` and `coalition_scuttle.auto_search_combat_execute`; consider extracting this into a shared helper or constant to keep behavior and rationale synchronized.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
处理进入仓库时误导航到任务界面的问题,并优化 D 级战斗结果的处理逻辑,避免将非船难战斗误判为船难,同时澄清情绪记录相关的行为。
Bug Fixes:
Enhancements:
FleetEmotion.value和FleetEmotion.record的惰性属性行为,以澄清无需进行手动赋值。Original summary in English
Summary by Sourcery
Handle misnavigation to mission screen when entering storage and refine handling of D-rank battle results to avoid misclassifying non-shipwreck battles as shipwrecks while clarifying emotion recording behavior.
Bug Fixes:
Enhancements: